<!doctype html>
<html lang="ru">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.ico') }}">
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">

    <title>{% block title %}{% endblock %} - Comrade-Wolf</title>
</head>
<body>
<section class="content">
    <header class="p-3 text-bg-dark bg-dark mb-5">
        <div class="container">
            <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
                <a href="/"
                   class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none">
                    <img src="{{ url_for('static', filename='/images/logo.png') }}" alt="Comrade Wolf">
                </a>

                <ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
                    <li><a href="{{ url_for('builder.create') }}" class="nav-link px-2 text-white">Построитель</a></li>
<!--                    <li><a href="#" class="nav-link px-2 text-secondary">Features</a></li>-->
<!--                    <li><a href="#" class="nav-link px-2 text-white">Pricing</a></li>-->
<!--                    <li><a href="#" class="nav-link px-2 text-white">FAQs</a></li>-->
                    <li><a href="#" class="nav-link px-2 text-white">О построителе</a></li>
                </ul>

                <div class="text-end">
                    {% if not current_user.is_authenticated %}
                    <a href="{{ url_for('auth.register') }}">
                        <button type="button" class="btn btn-outline-light me-2">Регистрация</button>
                    </a>
                    <a href="{{ url_for('auth.login') }}">
                        <button type="button" class="btn btn-warning">Вход</button>
                    </a>
                    {% endif %}
                    {% if current_user.is_authenticated %}
                    <a href="{{ url_for('auth.logout') }}">
                        <button type="button" class="btn btn-outline-secondary">Выйти</button>
                    </a>
                    {% endif %}
                </div>
            </div>
        </div>
    </header>
    <div class="container">
        {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
        {% for category, message in messages %}
        <div class="alert alert-{{ category }}">{{ message }}</div>
        {% endfor %}
        {% endif %}
        {% endwith %}
    </div>
    {% block content %}{% endblock %}
</section>


<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
        crossorigin="anonymous"></script>

</body>
</html>
